    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="renderer" content="webkit">
        <meta name="csrf-param" content="_csrf-backend">
<meta name="csrf-token" content="2NRkAI0OMWmUfu-uYkKfB3G2IPQczA8sVZ1jAqILBgCMoB4wu2BjPflMqvYLCdhmKdhUwlj-TEM96VNP5kRpcQ==">
        <title>配置管理</title>
        <link href="__STATIC__/admin/css/_all-skins.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/bootstrap.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/font-awesome.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/ionicons.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/datatables.bootstrap.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/adminlte.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/toastr.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/jquery.fancybox.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/cropper.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/rageframe.css" rel="stylesheet">
<link href="__STATIC__/admin/css/rageframe.widgets.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="__STATIC__/admin/js/html5shiv.min.js"></script>
<![endif]-->
<!--[if lt IE 9]>
<script src="__STATIC__/admin/js/respond.min.js"></script>
<![endif]-->
<script src="__STATIC__/admin/js/jquery.min.js"></script>
<script src="__STATIC__/admin/js/toastr.min.js"></script>
<script src="__STATIC__/admin/js/cropper.min.js"></script>    </head>
    <body class="hold-transition sidebar-mini fixed">
        <div class="wrapper-content">
        <section class="content-header">
            <a href="/backend/addons/rf-merchants/config/index" class="rfHeaderFont">
                <i class="glyphicon glyphicon-refresh"></i> 刷新
            </a>
                            <a href="javascript:history.go(-1)" class="rfHeaderFont">
                    <i class="fa fa-mail-reply"></i> 返回
                </a>
                        <ol class="breadcrumb"><li><a href="/backend/addons/rf-merchants/config/index"><i class="fa fa-dashboard"></i>RF</a></li>
<li class="active">配置管理</li>
</ol>        </section>
        <section class="content">
            
<div class="row">
    <div class="col-sm-12">
        <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li class="active"><a href="/backend/addons/rf-merchants/config/index"> 配置管理</a></li>
                <li><a href="/backend/addons/rf-merchants/config-cate/index"> 配置分类</a></li>
                <li class="pull-right">
                    <a class="btn btn-primary btn-xs" href="/backend/addons/rf-wechat/rule/edit"><i class="fa fa-plus"></i> 创建</a>
                </li>

            </ul>
            <div class="tab-content">
                <div class="active tab-pane">
                    <div id="w0" class="grid-view"><div class="summary">第<b>1-10</b>条，共<b>11</b>条数据.</div>
<table class="table table-hover"><thead>
<tr><th>#</th><th><a href="/backend/addons/rf-merchants/config/index?sort=title" data-sort="title">标题</a></th><th><a href="/backend/addons/rf-merchants/config/index?sort=name" data-sort="name">标识</a></th><th class="col-md-1"><a class="asc" href="/backend/addons/rf-merchants/config/index?sort=-sort" data-sort="-sort"> 排序</a></th><th>类别</th><th class="col-md-1"><a href="/backend/addons/rf-merchants/config/index?sort=type" data-sort="type">属性</a></th><th class="action-column">操作</th></tr><tr id="w0-filters" class="filters"><td>&nbsp;</td><td><input type="text" class="form-control" name="SearchModel[title]" value=""></td><td><input type="text" class="form-control" name="SearchModel[name]" value=""></td><td>&nbsp;</td><td><select id="searchmodel-cate_id" class="form-control" name="SearchModel[cate_id]">
<option value="">全部</option>
<option value="36"> 系统配置</option>
<option value="37">　　└── 系统基础</option>
<option value="38"> 微信配置</option>
<option value="39">　　└── 公众号</option>
<option value="40"> 小程序</option>
<option value="42">　　└── 基础配置</option>
</select></td><td><select id="searchmodel-type" class="form-control" name="SearchModel[type]">
<option value="">全部</option>
<option value="text">文本框</option>
<option value="password">密码框</option>
<option value="secretKeyText">密钥文本框</option>
<option value="textarea">文本域</option>
<option value="date">日期</option>
<option value="time">时间</option>
<option value="datetime">日期时间</option>
<option value="dropDownList">下拉文本框</option>
<option value="multipleInput">Input组</option>
<option value="radioList">单选按钮</option>
<option value="checkboxList">复选框</option>
<option value="baiduUEditor">百度编辑器</option>
<option value="image">图片上传</option>
<option value="images">多图上传</option>
<option value="file">文件上传</option>
<option value="files">多文件上传</option>
<option value="cropper">图片裁剪上传</option>
<option value="latLngSelection">经纬度选择</option>
</select></td><td>&nbsp;</td></tr>
</thead>
<tbody>
<tr data-key="94"><td>1</td><td>后台 Tab 页签</td><td>sys_tags</td><td>1</td><td>系统基础</td><td>单选按钮</td><td>  </td></tr>
<tr data-key="95"><td>2</td><td>公众号帐号</td><td>wechat_account</td><td>0</td><td>公众号</td><td>文本框</td><td>  </td></tr>
<tr data-key="96"><td>3</td><td>原始ID</td><td>wechat_id</td><td>1</td><td>公众号</td><td>文本框</td><td>  </td></tr>
<tr data-key="97"><td>4</td><td>级别</td><td>wechat_rank</td><td>2</td><td>公众号</td><td>单选按钮</td><td>  </td></tr>
<tr data-key="98"><td>5</td><td>App ID</td><td>wechat_appid</td><td>3</td><td>公众号</td><td>文本框</td><td>  </td></tr>
<tr data-key="99"><td>6</td><td>App Secret</td><td>wechat_appsecret</td><td>4</td><td>公众号</td><td>文本框</td><td>  </td></tr>
<tr data-key="100"><td>7</td><td>Token</td><td>wechat_token</td><td>5</td><td>公众号</td><td>密钥文本框</td><td>  </td></tr>
<tr data-key="101"><td>8</td><td>EncodingAESKey</td><td>wechat_encodingaeskey</td><td>6</td><td>公众号</td><td>文本框</td><td>  </td></tr>
<tr data-key="102"><td>9</td><td>微信关注二维码</td><td>wechat_qrcode</td><td>7</td><td>公众号</td><td>图片上传</td><td>  </td></tr>
<tr data-key="103"><td>10</td><td>App ID</td><td>miniprogram_appid</td><td>0</td><td>基础配置</td><td>文本框</td><td>  </td></tr>
</tbody></table>

<ul class="pagination"><li class="first disabled"><span><i class="icon ion-ios-arrow-left"></i><i class="icon ion-ios-arrow-left"></i></span></li>
<li class="prev disabled"><span><i class="icon ion-ios-arrow-left"></i></span></li>
<li class="active"><a href="/backend/addons/rf-merchants/config/index?per-page=10" data-page="0">1</a></li>
<li><a href="/backend/addons/rf-merchants/config/index?page=2&amp;per-page=10" data-page="1">2</a></li>
<li class="next"><a href="/backend/addons/rf-merchants/config/index?page=2&amp;per-page=10" data-page="1"><i class="icon ion-ios-arrow-right"></i></a></li>
<li class="last"><a href="/backend/addons/rf-merchants/config/index?page=2&amp;per-page=10" data-page="1"><i class="icon ion-ios-arrow-right"></i><i class="icon ion-ios-arrow-right"></i></a></li></ul>

                    </div>                </div>
            </div>
        </div>
    </div>
</div>        </section>
            </div>
    <!-- 公用底部-->
    <script>
        // 配置
        let config = {
            tag: "1",
            isMobile: "",
            emojiBaseUrl: "/backend/resources/img/emoji/",
        };
    </script>
    
<!--ajax模拟框加载-->
<div class="modal fade" id="ajaxModal" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <img class="loading" src="static/picture/loading.gif" alt="">                <span>加载中... </span>
            </div>
        </div>
    </div>
</div>
<!--ajax大模拟框加载-->
<div class="modal fade" id="ajaxModalLg" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-body">
                <img class="loading" src="static/picture/loading.gif" alt="">                <span>加载中... </span>
            </div>
        </div>
    </div>
</div>
<!--ajax最大模拟框加载-->
<div class="modal fade" id="ajaxModalMax" aria-hidden="true">
    <div class="modal-dialog modal-lg" style="width: 80%">
        <div class="modal-content">
            <div class="modal-body">
                <img class="loading" src="static/picture/loading.gif" alt="">                <span>加载中... </span>
            </div>
        </div>
    </div>
</div>
<!--初始化模拟框-->
<div id="rfModalBody" class="hide">
    <div class="modal-body">
        <img class="loading" src="static/picture/loading.gif" alt="">        <span>加载中... </span>
    </div>
</div>


<script>
    // 小模拟框清除
    $('#ajaxModal').on('hide.bs.modal', function (e) {
        if (e.target == this) {
            $(this).removeData("bs.modal");
            $('#ajaxModal').find('.modal-content').html($('#rfModalBody').html());
        }
    });
    // 大模拟框清除
    $('#ajaxModalLg').on('hide.bs.modal', function (e) {
        if (e.target == this) {
            $(this).removeData("bs.modal");
            $('#ajaxModalLg').find('.modal-content').html($('#rfModalBody').html());
        }
    });
    // 最大模拟框清除
    $('#ajaxModalMax').on('hide.bs.modal', function (e) {
        if (e.target == this) {
            $(this).removeData("bs.modal");
            $('#ajaxModalMax').find('.modal-content').html($('#rfModalBody').html());
        }
    });

    // 小模拟框加载完成
    $('#ajaxModal').on('shown.bs.modal', function (e) {
        autoFontColor()
    });
    // 大模拟框加载完成
    $('#ajaxModalLg').on('shown.bs.modal', function (e) {
        autoFontColor()
    });
    // 最模拟框加载完成
    $('#ajaxModalMax').on('shown.bs.modal', function (e) {
        autoFontColor()
    });

    // 启用状态 status 1:启用;0禁用;
    function rfStatus(obj) {
        let id = $(obj).attr('data-id');
        let status = 0;
        self = $(obj);
        if (self.hasClass("btn-success")) {
            status = 1;
        }

        if (!id) {
            id = $(obj).parent().parent().attr('id');
        }

        if (!id) {
            id = $(obj).parent().parent().attr('data-key');
        }

        $.ajax({
            type: "get",
            url: "/backend/addons/rf-merchants/config/ajax-update",
            dataType: "json",
            data: {
                id: id,
                status: status
            },
            success: function (data) {
                if (parseInt(data.code) === 200) {
                    if (self.hasClass("btn-success")) {
                        self.removeClass("btn-success").addClass("btn-default");
                        self.text('禁用');
                    } else {
                        self.removeClass("btn-default").addClass("btn-success");
                        self.text('启用');
                    }
                } else {
                    rfAffirm(data.message);
                }
            }
        });
    }

    // 排序
    function rfSort(obj) {
        let id = $(obj).attr('data-id');

        if (!id) {
            id = $(obj).parent().parent().attr('id');
        }

        if (!id) {
            id = $(obj).parent().parent().attr('data-key');
        }

        var sort = $(obj).val();
        if (isNaN(sort)) {
            rfAffirm('排序只能为数字');
            return false;
        } else {
            $.ajax({
                type: "get",
                url: "/backend/addons/rf-merchants/config/ajax-update",
                dataType: "json",
                data: {
                    id: id,
                    sort: sort
                },
                success: function (data) {
                    if (parseInt(data.code) !== 200) {
                        rfAffirm(data.message);
                    }
                }
            });
        }
    }
</script>    <script src="__STATIC__/admin/js/yii.js"></script>
<script src="__STATIC__/admin/js/yii.gridview.js"></script>
<script src="__STATIC__/admin/js/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/admin/js/bootstrap.min.js"></script>
<script src="__STATIC__/admin/js/fastclick.js"></script>
<script src="__STATIC__/admin/js/adminlte.js"></script>
<script src="__STATIC__/admin/js/demo.js"></script>
<script src="__STATIC__/admin/js/layer.js"></script>
<script src="__STATIC__/admin/js/sweetalert.min.js"></script>
<script src="__STATIC__/admin/js/jquery.fancybox.min.js"></script>
<script src="__STATIC__/admin/js/qq-wechat-emotion-parser.min.js"></script>
<script src="__STATIC__/admin/js/template.js"></script>
<script src="__STATIC__/admin/js/rageframe.js"></script>
<script src="__STATIC__/admin/js/rageframe.widgets.js"></script>
<script>jQuery(function ($) {
jQuery('#w0').yiiGridView({"filterUrl":"\/backend\/addons\/rf-merchants\/config\/index","filterSelector":"#w0-filters input, #w0-filters select","filterOnFocusOut":true});

    $(".pagination").append('<li style="float: left;margin-left: 10px;"><select class="form-control rf-per-page" name="rf-per-page" style="width:100px"><option value="10" selected>10条/页</option><option value="20">20条/页</option><option value="30">30条/页</option><option value="40">40条/页</option><option value="50">50条/页</option></select></li>');
    $(".pagination").append('<li>&nbsp;&nbsp;前往&nbsp;<input id="invalue" type="text" class="pane rf-page-skip-input"/>&nbsp;页</li>');

    // 跳转页码
    $('.rf-page-skip-input').blur(function() {
        var page = $('#invalue').val();
        if (!page) {
            return;
        }
        
        if (parseInt(page) > 0) {
              location.href = "http://demo2.rageframe.com/backend/addons/rf-merchants/config/index" + "?page="+ parseInt(page) + '&per-page=' + $('.rf-per-page').val();
        } else {
            $('#invalue').val('');
            rfAffirm('请输入正确的页码');
        }
    });
    
    // 选择分页数量
    $('.rf-per-page').change(function() {
        var page = $('#invalue').val();
        if (!page) {
            page = '1';
        }
  
        location.href = "http://demo2.rageframe.com/backend/addons/rf-merchants/config/index" + "?page="+ parseInt(page) + '&per-page=' + $(this).val();
    });
});</script>    </body>
    </html>
